package validation;


import dbmanager.DBManager;

public class Net implements Validation
{
	String ConditionValue;
	
	public boolean validate (String Value, String ConditionValue)
	{	
		try 
		{
			double val = Double.parseDouble(Value);
			double convalue = Double.parseDouble(ConditionValue);
			
			if (val == convalue)
			{
				return false;
			}
			else
				return true;
		}
		catch (NumberFormatException e) 
		{
			e.printStackTrace();
		}
		return false;
	}
	
	public boolean validate(String Value) 
	{
		return false;
	}
	public String getMessage() 
	{
		return " value must not be equal to "+ConditionValue ;
	}
	
	public static void main (String args[])
	{
		Net net = new Net();
		System.out.println("Validate : "+net.validate("120", "100"));
		System.out.println("Validate : "+net.validate("100", "100"));
	}

	public void setDbmanager(DBManager database) {
		// TODO Auto-generated method stub
		
	}

	public boolean validate(String Value, String ConditionValue, String Refvalue) 
	{
		this.ConditionValue = ConditionValue;	
		return validate(Value,ConditionValue);
	}

	public void setBasicvalue(String value) {
		// TODO Auto-generated method stub
		
	}
}
